#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a[3][2] = {{0, 1}, {2, 3}, {4, 5}};

    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 2; j++)
        {
            printf("%p ", &a[i][j]);
        }
        printf("\n");
    }
    printf("---------\n");
    int(*p)[2] = a; // 等同于int(*p)[2] = &a[0];
    printf("%p \n", p);

    printf("---------\n");
    int *p0 = *p; // 等同于int* p0 = a[0]; 等同于int* p0 = &a[0][0];
    printf("%p \n", p0);

    printf("---------\n");
    int(*p1)[2] = a + 1; // 等同于int(*p1)[2] = &a[1];
    printf("%p \n", p1);

    printf("---------\n");
    int *p2 = *(a + 1); // 等同于int *p2 = a[1]; 等同于int *p2 = &a[1][0];
    printf("%p \n", p2);

    printf("---------\n");
    int *p3 = *(a + 1) + 1; // 等同于 int *p3 = a[1] + 1; 等同于 int *p3 = &a[1][1];
    printf("%p \n", p3);

    printf("---------\n");
    int num = *(*a + 1); // 等同于int num = *(a[0] + 1); 等同于int num = a[0][1];
    printf("%d \n", num);
    return 0;
}